<?
//Set $Conn = Server.CreateObject("ADODB.Connection");
//$Conn.$Open "Driver={Microsoft Access Driver (*.mdb)};Dbq=".Server.mappath("/sp/database/CATC_DB.mdb");
$remote=1;
if($remote==1)
{
	$db_connection = null;
	$db_server = "db4free.net:3306"; 
	$db_database = "catc_db";
	$db_username = "catc_db";
	$db_password = "123456";
	$CONNECTED = false;

}else {
	$db_connection = null;
	$db_server = "localhost";
	$db_database = "catc_db";
	$db_username = "root";
	$db_password = "1234";
	$CONNECTED = false;
}
//				try {
$db_connection = mysql_connect ($db_server, $db_username, $db_password, true);
//if(!$db_connection)
//{
	
		
	if (!$db_connection)
	{
//		throw new Exception('MySQL Connection Database Error: ' . mysql_error());
//		echo "unconnect";
	}
	else
	{
//		mysql_select_db ($database,$db_connection);
		$CONNECTED = true;
//		echo "connect";
	}

//}
 
//            }catch (Exception $e){
//                echo $e->getMessage();
//            }


mysql_select_db ($db_database,$db_connection);
//mysql_select_db ($db_database);
$result = mysql_query("SELECT * FROM tblanswers");

//if (!$result) {
//    echo 'Could not run query: ' . mysql_error();
//    exit;
//}


/*
while($row = mysql_fetch_row($result))
{
//$row = mysql_fetch_row($result);
echo $row[0] . "<br>"; // 42
echo $row[1] . "<br>"; // the email value
}
*/
?>
